﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace STF.OrangeDog.Model
{
    public class Comment:BaseModel
    {
        [ForeignKey(nameof(Blog.Id))]
        public int bid { get; set; }
        [Required(ErrorMessage = "{0}不能为空")]
        [StringLength(5000), Column(TypeName = "varchar(5000)")]
        [Display(Name = "评论内容")]
        public string content { get; set; }
        
        public int GoodPraise { get; set; }
        [ForeignKey(nameof(UsersInfo.Id))]
        public int uid { get; set; }
    }
}
